#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include"market.h"
#include"function"
int main()
{
	struct Node1* head= (struct Node1*)malloc(sizeof(struct Node1));
	struct Node2* head2= (struct Node2*)malloc(sizeof(struct Node2));
	struct Node3* head3= (struct Node3*)malloc(sizeof(struct Node3));
	struct Node4* head4= (struct Node4*)malloc(sizeof(struct Node4));
	head->next=NULL;
	head2->next=NULL;
	head3->next=NULL;
	head4->next=NULL;
	
	Read(head);//读取
	Read2(head2);//读取
	Read3(head3);
	Read4(head4);
	int n = 1;
	while (n != 0)//死循环
	{
		printf("欢迎超市管理系统：\n");
		printf("**************************************\n");
		printf("* 请选择身份操作序号：               *\n");
		printf("* 1 管理员                           *\n");
		printf("* 2 普通用户                         *\n");
		printf("* 0 退出系统                         *\n");
		printf("**************************************\n");
		printf("请选择：");
		scanf("%d", &n);
		system("cls");
		switch (n)//选择
		{
		case 0:
			return 0;
			main1(head, head2,head3,head4);//管理员函数
			break;
		case 2:
			main2(head2,head3,head4);//用户函数
			break;
		default:
			printf("输入错误， 按任意键返回主菜单");
			break;
		}
		printf("\n");
		system("pause");
		system("cls");
	}
	return 0;//返回值为0
}
